package day8;

public class Person {
    private String name;
    private int age;
    private String birthday;

    public String getName() {
        return name==null?"":name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        if (age>150||age<0){
            System.out.println("年龄有误，请重新设置");
            return;
        }
        this.age=age;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }
}
